<%@ page import="MypageController.MyMain.MyMainBean" %>
<%@ page import="MypageController.MyKategore.MyKategoreBean" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
//String Mem_Nick = (String)request.getAttribute("id");
String you = null;
if((String)request.getAttribute("you") != null){
	you = (String)request.getAttribute("you");
}
String id = (String)request.getAttribute("id");
int mypageid = (Integer)request.getAttribute("mypageid");
int mypageId = (Integer)request.getAttribute("mypageid");
int value = (Integer)request.getAttribute("value");
int level = (Integer)request.getAttribute("level");
MyMainBean mypagedata = (MyMainBean)request.getAttribute("mypagedata");
MyKategoreBean kategorilist[] = (MyKategoreBean[])request.getAttribute("kategorilist");

String massage;
String definite;
if(value == 1){
	massage = "相手が招待を断りました。";
	definite = "Write()";
}else if(value == 2){
	massage = "相手の承認を待っています。";
	definite = "Write()";
}else{
	massage = you + "様と共有しています。";
	definite = "manageDefinite()";
}

String color;
if(level == 1){
	color = "#60b615";
}else{
	color = "#0f89d2";
}

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/KOMORIUTA/Mypage/Css/MpBord.css"> 

<script src="/KOMORIUTA/Mypage/Mp_Script.js" type="text/JavaScript"></script>
<script src="/KOMORIUTA/Mypage/jquery.js" type="text/JavaScript"></script>
</head>
<body>
<form id="form" method="post" action="/KOMORIUTA/MyMainServ.do">
<div class="join_form">
<input type="hidden" name="action" value="manageset">
<input type="hidden" id="nick" name="id" value="<%=id %>">
<input type="hidden" name="mypageid" value="<%=mypageId %>">


<table align="center" width="696" height="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="3" align="center" width="100%" height="100" background="<%=request.getContextPath() %>/Mypage/image/topskin.jpg" style="border-right: 2px solid <%=color %>; border-bottom: 2px solid <%=color %>">
			<table width="100%"cellpadding="0" cellspacing="0">
				<tr height="20%"><td>&nbsp;</td></tr>
				
				<tr align="center">
					<td width="80%">
						<h1><%=mypagedata.getBlog_Tilte()%></h1>
					</td>
				</tr>
				
				<tr>
					<td align="right" valign="bottom" >
						<%=mypagedata.getBlog_Intro() %>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td align="right" valign="middle" colspan="2">
			<a href=javascript:startPage("<%=id%>","<%=0%>")>
			
			
				<!-- 
				<% if(level == 1){ %>共有者
				<% }else{ %>製作者<% }%>[<%=id%>]
				 -->
			
			
				<img alt="" src="<%=request.getContextPath() %>/Main/image/Blog_My.png">
			</a>　
			<a href=javascript:entriWrite('<%=id%>',<%=mypageid%>)> 
				<img alt="" src="<%=request.getContextPath() %>/Main/image/Blog_Wr.png">
			</a>　
				<% if(level == 2){ %>
			<a href=javascript:manage('<%=id%>',<%=mypageid%>)>
				<img alt="" src="<%=request.getContextPath() %>/Main/image/Blog_Ad.png">
			</a>
				<% } %>
		</td>
	</tr>
	<tr height="10"><td colspan="3"></td></tr>
	
	
	
	<tr>
		<td width="5"></td>
		
		<td bgcolor="#f6f6f6" style="border-left: 1px solid #dddddd; border-top: 1px solid #dddddd; border-right: 1px solid #dddddd;">
			<table width="600" align="center" cellpadding="0" cellspacing="0">
				<tr height="40"><td colspan="3"></td></tr>
				<tr>
					<td width="180">
						<img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> MyPage共有者
					</td>
					<td width="20">&nbsp;</td>
					<td valign="middle">
						<label id="youname" style="width: 300px"><%=massage %></label>
						<span id="check1" class="feedback"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> 存在する「ID」がありません。</span>
						<span id="check2" class="feedback"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> 共有する人の「ID」を書いて下さい。</span> 
					</td>
				</tr>
				
				<tr height="40">
					<td>
						<img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> MyPage名前
					</td>
					
					<td width="20">&nbsp;</td>
					
					<td>
						<input type="text" name="title" value="<%=mypagedata.getBlog_Tilte()%>" />
					</td>
				</tr>
				
				<tr>
					<td>
						<img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> 挨拶の言葉
					</td>
					
					<td width="20">&nbsp;</td>
					
					<td>
						<textarea name="textarea" cols="25" rows="3"><%=mypagedata.getBlog_Intro() %></textarea>
					</td>
				</tr>
			</table>
		</td>
		
		<td width="5"></td>
	</tr>
			<!--  
			<p>
 				<label for="password"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> MyPage共有者</label>
	 			<label id="youname" style="width: 200px"><%=massage %></label> 
	 			<input type="button" onclick="amendment()" src="<%=request.getContextPath() %>/Main/image/Blog_Re.png">
	 			<span id="check1" class="feedback"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> 存在する「ID」がありません。</span>
	 			<span id="check2" class="feedback"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> 共有する人の「ID」を書いて下さい。</span>
 			</p>
 			<P>
 				<label for="id"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> MyPage名前</label>
				<input type="text" name="title" value="<%=mypagedata.getBlog_Tilte()%>" />
 			</P>
 			<p>
 				<label for="passwordtest"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> 挨拶の言葉</label>
 				<textarea name="textarea" cols="25" rows="3"><%=mypagedata.getBlog_Intro() %></textarea>
 			</p>
 			
 			-->
		
	
	
	<tr>
		<td width="5"></td>
		
		<td bgcolor="#f6f6f6" style="border-bottom: 1px solid #dddddd; border-right: 1px solid #dddddd; border-left: 1px solid #dddddd;">
			<table width="600" align="center" cellpadding="0" cellspacing="0">
				<tr height="40">
					<td width="180">
						<img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> カテゴリ追加
					</td>
					<td width="20">&nbsp;</td>
					<td valign="middle">
						<input id="Catetext" type="text" name="catetext"  size="30"/>
						<img style="cursor: pointer; vertical-align: bottom;" src="/KOMORIUTA/Mypage/image/Mybold_Add.png"  onClick="ManageKategorieAdd('<%=mypageId %>')"  />
   						<img style="cursor: pointer; vertical-align: bottom;" src="/KOMORIUTA/Mypage/image/Mybold_Dl.png"  onClick="ManageKategorieDelet('<%=mypageId %>')"/>
					</td>
				</tr>
				
				<tr height="1px"><td></td></tr>
				
				<tr>
					<td>
						<img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> カテゴリ目録
					</td>
					<td width="20">&nbsp;</td>
					<td valign="middle">
						<select id="Categorie" name="menu" size="5" multiple="multiple" style="width:220px" onchange="MM_jumpMenu()">
							<% for(int i=0;i<kategorilist.length;i++){ %>
								<option value="<%=kategorilist[i].getKeta_Title() %>"><%=kategorilist[i].getKeta_Title() %></option>
							<% } %>
		    			</select>
					</td>
				</tr>
				<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td colspan="3"><table width="100%" style="border-bottom: 1px dashed #dddddd"><tr><td></td></tr></table></td></tr>
				<tr><td>&nbsp;</td></tr>
				<tr align="center">
					<td colspan="3">
						<img style="cursor: pointer;" src="/KOMORIUTA/Mypage/image/Mybold_Cf.png" onClick="manageDefinite()"/>
					</td>
				</tr>
				<tr height="10"><td colspan="3">&nbsp;</td></tr>
			</table>
			
			<!--  
			<p>
 				<label for="password"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> カテゴリ追加</label>
 				<input id="Catetext" type="text" name="catetext" />
 			</p>
 			<p>
 				<label for="password">&nbsp;</label>
 				
 				<img style="cursor: pointer;" src="/KOMORIUTA/Mypage/image/button1.png" onClick="ManageKategorieAdd('<%=mypageId %>')"/>&nbsp;&nbsp;&nbsp;
   				<img style="cursor: pointer;" src="/KOMORIUTA/Mypage/image/button2.png" onClick="ManageKategorieDelet('<%=mypageId %>')"/>
 			</p>
 			<P>
 				<label for="id"><img src="<%=request.getContextPath() %>/Main/image/Mp_Manage_Icon.png"/> カテゴリ目録</label>
				<select id="Categorie" name="menu" size="5" multiple="multiple" style="width:220px" onchange="MM_jumpMenu()">
				<% for(int i=0;i<kategorilist.length;i++){ %>
					<option value="<%=kategorilist[i].getKeta_Title() %>"><%=kategorilist[i].getKeta_Title() %></option>
				<% } %>
    			</select>
 			</P>
 			<p align="center">
 				<img style="cursor: pointer;" src="/KOMORIUTA/Mypage/image/button3.png" onClick="<%=definite%>"/>
 			</p>
 			
 			-->
		</td>
		
		<td width="5"></td>
	</tr>
</table>	
	

</form>
</body>
</html>